import request from '@/utils/request'
export const getEnterpriseListApi = (params) => {
  return request({
    url: '/park/enterprise',
    method: 'get',
    params
  })
}
export const getIndustryListApi = () => {
  return request({
    url: '/park/industry',
    method: 'get'
  })
}
export const addEnterpriseApi = (data) => {
  return request({
    url: '/park/enterprise',
    method: 'post',
    data
  })
}
export const queryEnterpriseApi = (id) => {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'get'
  })
}
export const editEnterpriseApi = (data) => {
  return request({
    url: '/park/enterprise',
    method: 'put',
    data
  })
}
export const delEnterpriseApi = (id) => {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'delete'
  })
}
export const queryBuildList = () => {
  return request({
    url: '/park/rent/building',
    method: 'get'
  })
}
export const addRecentApi = (data) => {
  return request({
    url: '/park/enterprise/rent',
    method: 'post',
    data
  })
}
export const getRentListApi = (id) => {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'get'
  })
}
export const rentOutApi = (id) => {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'put'
  })
}
export const lookEnterpriseDetail = (id) => {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'get'
  })
}
export function createRuleAPI(data) {
  return request({
    url: '/parking/rule',
    method: 'POST',
    data
  })
}
export function getProfileAPI() {
  return request({
    url: '/park/user/profile',
    method: 'GET'
  })
}
